function y = double(htio)
% transio::double  - given entire contents in good dims as double (forced)
%
% FORMAT:       y = double(tio);
%
% Input fields:
%
%       tio         transio object
%
% Output fields:
%
%       y           data retrieved from transio object in double

% Version:  v0.7f
% Build:    8110700
% Date:     Nov-07 2008, 12:00 AM CET
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin < 1 || ...
    numel(struct(htio)) ~= 1
    error( ...
        'transio:BadSubsRef', ...
        'No S subsref struct given.' ...
    );
end

% try retrieval
try
    y = double(resolve(htio));
catch
    rethrow(lasterror);
end
